
package com.buding.fx.entity;
import lombok.Data;
import java.io.Serializable;
import java.util.Objects;
import java.util.Set;

/**
 * @author Zheng Jie
 * @date 2018-12-17
 */
@Data
public class Menu extends BaseEntity implements Serializable {

    private Long id;


    private String title;

    private String uniqueId;

    private String redirectUrl;

    private Integer menuSort = 999;


    private String component;


    private String path;


    private Integer type;

    private Integer level;


    private String permission;


    private String icon;
    private String iconPath;


    private Boolean cache;


    private Boolean hidden;


    private Long pid;


    private Integer subCount = 0;


    private Boolean iFrame;

    public Menu(Long id,Long pid,Integer level,String title,Integer menuSort,String icon,String iconPath){
            this.id = id;
            this.pid = pid;
            this.level = level;
            this.title = title;
            this.menuSort = menuSort;
            this.icon = icon;
            this.iconPath = iconPath;
    };

    public Menu() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Menu menu = (Menu) o;
        return Objects.equals(id, menu.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }


}
